package com.jozen.smart_toilet_system.ui.woman_remaining_tag_view;

import android.content.Context;
import android.view.LayoutInflater;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.jozen.smart_toilet_system.R;

/**
 * 女厕：剩余厕间组件
 */
public class WomanRemainingToiletRoomTagView extends RelativeLayout {
    private Context context;
    private static int viewWidth = 0, viewHeight = 0;
    private static LinearLayout ll_woman_toilet_room;
    private ImageView iv_icon;
    private TextView tv_woman_toilet_room_val;

    public WomanRemainingToiletRoomTagView(Context context) {
        super(context);
        this.context = context;
        initViews();
    }

    private void initViews() {
        LayoutInflater.from(context).inflate(R.layout.zt_woman_toilet_room_tag_layout, this, true);
        ll_woman_toilet_room = (LinearLayout) findViewById(R.id.ll_woman_toilet_room);
        iv_icon = (ImageView) findViewById(R.id.iv_icon);
        tv_woman_toilet_room_val = (TextView) findViewById(R.id.tv_woman_toilet_room_val);
    }


    public static int getViewWidth() {
        if (ll_woman_toilet_room != null) {
            viewWidth = ll_woman_toilet_room.getWidth();
        }
        return viewWidth;
    }

    public static int getViewHeight() {
        if (ll_woman_toilet_room != null) {
            viewHeight = ll_woman_toilet_room.getHeight();
        }
        return viewHeight;
    }

    /**
     * 设置数据源
     */
    public void setData(){
        // TODO: 2023/9/25 等接口那边定义数据结构再实现
    }
}
